/*
 * hello_client.c
 *
 *  Created on: Jun 1, 2014
 *      Author: Lhmily
 */

#include "../include/base.h"
int main(int argc, char **argv) {
	SOCKET s;
	INIT();

	s = tcp_client(argv[1], argv[2]);

	int rc;
	char buf[120];

	while (1) {
		rc = recv(s, buf, sizeof(buf), 0);
		if (rc <= 0)
			break;
		write(1, buf, rc);
	}
}
